Learn R Programming

modello (version 0.1.1)

[<-.modello_number: Sets the value of a slice in a number

Description

Sets the value of a slice in a number

Usage

# S3 method for modello_number
[(x, ..., dx = FALSE) <- value

Arguments

x

number

...

indexes defining the slice

dx

if TRUE the slice is taken from the gradient

value

value to set

Examples

Run this code
# NOT RUN {
modello.init(10, 10, 10, 10)
x = number(matrix(rnorm(9), 3, 3))
print(x$v)
x[1,1] = -100
print(x$v)
x[1:2,1:2] = 100
print(x$v)
modello.close()
# }

Run the code above in your browser using DataLab